package com.ruyuan.course.basic.biz.mapper;

import com.ruyuan.course.basic.biz.domain.Demo;
import org.apache.ibatis.annotations.*;

/**
 * @author demo
 * version: 1.0
 * Description:demo mapper组件
 **/
@Mapper
public interface DemoMapper {

    /**
     * 根据id查询demo信息
     *
     * @param id 主键id
     * @return demo信息
     */
    @Select("select * from tb_demo where id = #{id}")
    @Results({
            @Result(column = "id", property = "id"),
            @Result(column = "name", property = "name")
    })
    Demo getById(@Param(value = "id") Integer id);
}
